#include "dag.h"

using namespace dag;
using namespace std;

FrameLink::FrameLink() {
}

FrameLink::FrameLink(const Link& boolLink,
					   const Link& intLink,
					   const Link& floatLink,
					   const Link& doubleLink) 
:	bLink(boolLink),
	iLink(intLink),
	fLink(floatLink),
	dLink(doubleLink)
{
}

void FrameLink::serialize(ostream& binaryStream) const {
	bLink.serialize(binaryStream);
	iLink.serialize(binaryStream);
	fLink.serialize(binaryStream);
	dLink.serialize(binaryStream);
}

FrameLink FrameLink::inflate(istream& binaryStream) {
	FrameLink newFrameLink;
	newFrameLink.bLink = Link::inflate(binaryStream);
	newFrameLink.iLink = Link::inflate(binaryStream);
	newFrameLink.fLink = Link::inflate(binaryStream);
	newFrameLink.dLink = Link::inflate(binaryStream);
	
	return newFrameLink;
}